package xhwl.insurance.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.android.common.util.SPUtil;
import xhwl.insurance.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by admin on 2017/6/7.
 * 心电阅片订单列表
 */

public class SaleInfoApi extends BaseApi {
    SaleInfoReq req;

    public SaleInfoApi () {
        req = new SaleInfoReq();
        setShowErrorMsg(false);
    }

    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).getSaleInfo(requestBody);
    }

    class SaleInfoReq {
        String member_id;

        public SaleInfoReq() {
            this.member_id= SPUtil.getPersonInfoSp().getString(SPUtil.SPPersonInfo.MEMBER_ID,"");
        }
    }
}
